<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/>
    <title>系统角色管理</title>
    <#include "../../resource.ftl"/>
</head>

<body>
<div class="container-fluid p-t-15">
    <div class="row" style="font-size: 3px">
        <div class="col-lg-12">
            <div class="card">
                <div class="card-header"><h4>系统角色管理</h4></div>
                <div class="card-body">
                    <div class="input-group m-b-10 col-xs-5">
                        <span class="input-group-addon" id="sizing-addon0">角色名称</span>
                        <input class="form-control" type="text" id="name" name="name"
                               placeholder="请输入角色名称..." aria-describedby="sizing-addon0"/>
                        <span class="input-group-addon" id="sizing-addon1">角色说明</span>
                        <input class="form-control" type="text" id="remark" name="remark"
                               placeholder="请输入角色说明..." aria-describedby="sizing-addon1"/>
                        <span class="input-group-addon btn btn-info table-search" id="sizing-addon3"
                        >查询</span>
                        <span class="input-group-addon btn btn-primary reset-search" id="sizing-addon4"
                        >清空</span>
                    </div>
                    <div id="toolbar" class="toolbar-btn-action">
                        <button id="btn_add" type="button" class="btn btn-primary m-r-5" data-toggle="modal"
                                data-target="#addObjModal">
                            <span class="mdi mdi-plus" aria-hidden="true"></span>新增
                        </button>
                        <button id="btn_edit" type="button" class="btn btn-info m-r-5" data-toggle="modal"
                                data-target="#updateObjModal">
                            <span class="mdi mdi-border-color" aria-hidden="true"></span>修改
                        </button>
                        <button id="btn_delete" type="button" class="btn btn-danger m-r-5">
                            <span class="mdi mdi-window-close" aria-hidden="true"></span>删除
                        </button>
                    </div>
                    <table id="tb_base"></table>
                </div>
            </div>
        </div>


    </div>

    <!-- 详情 -->
    <div class="modal fade" tabindex="-1" role="dialog" aria-labelledby="gridSystemModalLabel"
         id="gridSystemModal">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                                aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="gridSystemModalLabel">文件详情</h4>
                </div>
                <div class="modal-body">
                    <div class="row">
                        <div class="col-md-4">.col-md-4</div>
                        <div class="col-md-4 col-md-offset-4">.col-md-4 .col-md-offset-4</div>
                    </div>
                    <div class="row">
                        <div class="col-md-3 col-md-offset-3">.col-md-3 .col-md-offset-3</div>
                        <div class="col-md-2 col-md-offset-4">.col-md-2 .col-md-offset-4</div>
                    </div>
                    <div class="row">
                        <div class="col-md-6 col-md-offset-3">.col-md-6 .col-md-offset-3</div>
                    </div>
                    <div class="row">
                        <div class="col-sm-9">
                            Level 1: .col-sm-9
                            <div class="row">
                                <div class="col-xs-8 col-sm-6">
                                    Level 2: .col-xs-8 .col-sm-6
                                </div>
                                <div class="col-xs-4 col-sm-6">
                                    Level 2: .col-xs-4 .col-sm-6
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-primary">点击保存</button>
                </div>
            </div>
        </div>
    </div>

    <!-- 新增 -->
    <div class="modal fade" tabindex="-1" role="dialog" aria-labelledby="gridSystemModalLabel"
         id="addObjModal">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                                aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="gridSystemModalLabel">新增角色</h4>
                </div>
                <div class="modal-body">

                    <form id="addObjForm" method="post" class="site-form">
                        <div class="form-group">
                            <label for="name">角色名称</label>
                            <input type="text" class="form-control" name="name" id="name"
                                   placeholder="请输入角色名称"/>
                        </div>
                        <div class="form-group">
                            <label for="remark">角色说明</label>
                            <input type="text" class="form-control" name="remark" id="remark"
                                   placeholder="请输入角色说明"/>
                        </div>
                    </form>

                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-primary add-obj-btn">新增提交</button>
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                </div>
            </div>
        </div>
    </div>

    <!-- 修改 -->
    <div class="modal fade" tabindex="-1" role="dialog" aria-labelledby="gridSystemModalLabel"
         id="updateObjModal">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                                aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="gridSystemModalLabel">修改角色</h4>
                </div>
                <div class="modal-body">

                    <form id="updateObjForm" method="post" class="site-form">
                        <div class="form-group">
                            <input type="hidden" class="form-control" name="id" id="id"/>
                        </div>
                        <div class="form-group">
                            <label for="name">角色名称</label>
                            <input type="text" class="form-control" name="name" id="name"
                                   placeholder="请输入角色名称"/>
                        </div>
                        <div class="form-group">
                            <label for="remark">角色说明</label>
                            <input type="text" class="form-control" name="remark" id="remark"
                                   placeholder="请输入角色说明"/>
                        </div>
                        <hr>
                        <div class="form-group">
                            <h4 class="modal-title">设置该角色权限</h4>
                            <br>
                            <button class="btn btn-xs btn-w-xs btn-secondary expand-all-btn">全部展开</button>
                            <button class="btn btn-xs btn-w-xs btn-secondary collapse-all-btn">全部关闭</button>
                            <div id="updateTree"></div>
                        </div>
                    </form>

                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-primary update-obj-btn">修改提交</button>
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                </div>
            </div>
        </div>
    </div>

</div>

<script type="text/javascript" src="/system/role/js/list.js"></script>
</body>
</html>